﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin.master" AutoEventWireup="true" CodeBehind="AdmParcelRecord.aspx.cs" Inherits="FastShip88.Admin.AdmParcelRecord" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Content" runat="server">
    <asp:Label ID="Label1" runat="server" Text="请输入新进包裹信息："></asp:Label>
    <p></p>
    <table style="width: 800px;">
        <tr>
            <td style="height: 18px; width: 90px">
                &nbsp;运单号：
            </td>
            <td style="height: 18px; width: 200px">
                &nbsp;<asp:TextBox ID="txtParcelNo" runat="server"  MaxLength=22 
                    CausesValidation="True"></asp:TextBox><font color="#ff0000">*</font>
            </td>
            <td style="height: 18px; width: 510px">
                &nbsp;
                <asp:LinkButton ID="btnCheckParcel" runat="server" 
                    onclick="btnCheckParcel_Click" Visible="False">检查包裹</asp:LinkButton> &nbsp; 
                <asp:Label
                    ID="lblCheckParcelResult" runat="server" Font-Bold="True"></asp:Label>
                <asp:RequiredFieldValidator ID="vldParcelNoRequired" runat="server" 
                    ErrorMessage="请输入运单号。" ControlToValidate="txtParcelNo"></asp:RequiredFieldValidator>
                <asp:CustomValidator ID="vldCheckParcel" runat="server" 
                    ErrorMessage="包裹已存在，请检查运单号。" 
                    onservervalidate="vldCheckParcel_ServerValidate" 
                    ControlToValidate="txtParcelNo"></asp:CustomValidator>
            </td>
        </tr>
        <tr>
            <td >
                &nbsp;用户名：
            </td>
            <td >
                &nbsp;<asp:TextBox ID="txtUserName" runat="server" CausesValidation="True"></asp:TextBox><font color="#ff0000">*</font>
            </td>
            <td >
                &nbsp;
                <asp:LinkButton ID="btnCheckUser" runat="server" Visible="False">检查用户</asp:LinkButton> &nbsp; 
                <asp:Label
                    ID="lblCheckUserResult" runat="server" Font-Bold="True"></asp:Label><asp:RequiredFieldValidator
                        ID="vldUserNameRequired" runat="server" ErrorMessage="请输入用户名。" 
                    ControlToValidate="txtUserName"></asp:RequiredFieldValidator>
                <asp:CustomValidator ID="vldCheckUser" runat="server" 
                    ErrorMessage="用户不存在，请重新输入用户名。" 
                    onservervalidate="vldCheckUser_ServerValidate" 
                    ControlToValidate="txtUserName"></asp:CustomValidator>
            </td>
        </tr>
        
        <tr>
            <td>
                &nbsp;邮递公司：
            </td>
            <td>
                &nbsp;
                <asp:DropDownList ID="ddlDeliveryCom" runat="server" DataSourceID="SqlDataSource2" 
                    DataTextField="name" DataValueField="id">
                </asp:DropDownList><font color="#ff0000">*</font>
            </td>
            <td>
                &nbsp;
            </td>
        </tr>

        
        <tr>
            <td>
                &nbsp;商家：
            </td>
            <td>
                &nbsp;
                <asp:DropDownList ID="ddlShops" runat="server" DataSourceID="SqlDataSource1" 
                    DataTextField="name" DataValueField="id">
                </asp:DropDownList><font color="#ff0000">*</font>
            </td>
            <td>
                &nbsp;<asp:LinkButton ID="btnSearchShop" runat="server" Visible="false" >搜索</asp:LinkButton>
            </td>
        </tr>
               <tr>
            <td>
                &nbsp;重量：
            </td>
            <td>
                &nbsp;<asp:TextBox ID="txtWeight" runat="server"></asp:TextBox><font color="#ff0000">*</font>
            </td>
            <td>
                &nbsp;单位为磅（pound）,可以包含小数点。
            </td>
        </tr>
               <tr>
            <td>
                &nbsp;描述：
            </td>
            <td colspan=2 >
                &nbsp;<asp:TextBox ID="txtDescription" runat="server" Width="500px" Height="36px"></asp:TextBox>
            </td>
            
        </tr>
               <tr>
            <td>
                &nbsp;体积：
            </td>
            <td>
                &nbsp;长<asp:TextBox ID="txtLength" runat="server" Width="40px" ></asp:TextBox>
                  &nbsp;宽<asp:TextBox ID="txtWidth" runat="server" Width="40px" ></asp:TextBox>
                &nbsp;高<asp:TextBox ID="txtHeight" runat="server" Width="40px" ></asp:TextBox>
              
            </td>
            <td>
                &nbsp; 单位为英寸（inch），不能包含小数点。
            </td>
        </tr>
                     <tr>
            <td>
                &nbsp;备注：
            </td>
            <td colspan=2>
                &nbsp;<asp:TextBox ID="txtMemo" runat="server" Height="36px" Width="500px" ></asp:TextBox>
            </td>
            
        </tr>
              </tr>
                     <tr>
            <td>
                &nbsp;
            </td>
            <td colspan=2>
                &nbsp;
            </td>
            
        </tr>
    </table>
    &nbsp; 
    <asp:Button ID="btnSave" runat="server" Text="保存" onclick="btnSave_Click" />
    &nbsp;<asp:Label ID="lblSaveResult" runat="server" Font-Bold="True" Text=""></asp:Label>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:FastShip88ConnectionString %>" 
        SelectCommand="SELECT [id], [name] FROM [ShopInfos]"></asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
        ConnectionString="<%$ ConnectionStrings:FastShip88ConnectionString %>" 
        SelectCommand="SELECT * FROM [DeliveryCompany]"></asp:SqlDataSource>
</asp:Content>
